<%
int search_category = 0;
User currentUser = themeDisplay.getUser();
System.out.println(">>>>>>Comments>>>>"+currentUser.getComments());

String comments = currentUser.getComments();
String[] options = null;     

if(comments.equals("school") || 
   comments.equals("student")|| 
   comments.equals("parent") ||
   comments.equals("teacher")){
      
	   options = new String[4];
	   options[0]="Institutions";
	   options[1]="Student";
	   options[2]="Teacher";
	   options[3]="Parents";  
	    
}else 
if(comments.equals("college") || 
   comments.equals("collStudent")|| 
   comments.equals("staff")){
   
	   options = new String[3];
	   options[0]="Institutions";
	   options[1]="Student";
	   options[2]="Lecturers";
	   
}else 
if(comments.equals("mainstay")){

	   options = new String[1];
	   options[0]="mainstay";
			   
}else{
options = new String[1];
		options[0]="    ";
}
%>

<liferay-portlet:renderURL var="searchURL" windowState="<%= WindowState.NORMAL.toString() %>" >
	<portlet:param name="struts_action" value="/ext/search/searchAction" />
	<portlet:param name="<%= Constants.CMD %>" value="search" /> 
	<portlet:param name="comments" value="<%= currentUser.getComments()%>" /> 
</liferay-portlet:renderURL>

<form action="<%= searchURL.toString() %>" method="POST" name="<portlet:namespace />fm"> 


<input type="text" name="<portlet:namespace />search" value="<%= ParamUtil.getString(request,"search") %>" />

<select name="<portlet:namespace />search_category">

	<% 
		for(int i=0; i<options.length; i++){
	%>
	<option <%= (search_category == i+1) ? "selected" : "" %> value=<%=i+1 %> ><liferay-ui:message key="<%=options[i] %>" /></option>
	<% 
		}   // for loop end
	%>
</select>

<input type="submit" value="<liferay-ui:message key="search" />" />


</form>